import * as types from './types'
import {getList} from '../api/api'

export default {
  increase: ({commit}) => {
    commit(types.INCREASE)
  },
  decrease: ({commit}) => {
    commit(types.DECREASE)
  },
  getData: ({commit}) => {
    Promise((resolve) => {
      getList().then(response => {
        resolve()
        commit(types.GETDATA, response.data)
      })
    })
  }
}
